# Find installed C LAPACK

# find include path
find_path(clapack_INCLUDE_DIR
   NAMES clapack.h
   DOC "C LAPACK include path"
)

# find static library
find_library(clapack_LIBRARY
   NAMES lapack
   DOC "C LAPACK library"
)

set(clapack_INCLUDE_DIRS ${clapack_INCLUDE_DIR})
set(clapack_LIBRARIES ${clapack_LIBRARY})

if (clapack_INCLUDE_DIR AND clapack_LIBRARY)
   set(clapack_FOUND TRUE)
   if (NOT clapack_FIND_QUIETLY)
      message (STATUS "Found C LAPACK: ${clapack_LIBRARY}")
   endif()
else()
   set(clapack_FOUND FALSE)
   if (clapack_FIND_REQUIRED)
      message(FATAL_ERROR "Could not find C LAPACK")
   endif()
endif()
